package com.jl.cloud.consumer.service.impl;


import com.jl.cloud.commom.base.BaseService;
import com.jl.cloud.consumer.mapper.TerminalMapper;
import com.jl.cloud.consumer.model.Terminal;
import com.jl.cloud.consumer.service.ConsumersService;
import com.jl.cloud.consumer.service.TerminalService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class TerminalServiceImpl extends BaseService<Terminal>  implements TerminalService {

    @Resource
    private ConsumersService consumersService;

    @Override
    public List<Terminal> findAll() {
        return  ((TerminalMapper)dao).findAll();
        //return terminalMapper.findAll();
    }


    @Override
    public void updateTransaction() {
        Terminal terminal = new Terminal();
        terminal.setId(1);
        terminal.setTerminalName("1231");
        updateById(terminal);
        consumersService.updateTransaction();
        Integer i = null;
        i.toString();
    }
}
